<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
	</head>
	<body>
		<ul>
			<li>red</li>
			<li>blue</li>
			<li>green</li>
		</ul>
		
		<script src="../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			/* window.onload = function() {
				var blue = document.getElementsByTagName("li")[1];
				console.log(blue);
				console.log(blue.parentNode);
				console.log(blue.parentNode.parentNode);
				console.log(blue.parentNode.parentNode.parentNode);
				console.log(blue.parentNode.parentNode.parentNode.parentNode);
				console.log(blue.parentNode.parentNode.parentNode.parentNode.parentNode);
			} */
			
			$(function() {
				console.log($("li"));
				
				var jQueryObj = $("li:eq(1)");
				console.log(jQueryObj.parent());
				
				var domObj = $("li")[1];// 通过下标拿出来的是JS DOM对象
				console.log(domObj.parentNode);
				// console.log(domObj.parent());
				var jQueryObj2 = $(domObj);// 把js dom对象作为参数传给$()，就得到对应封装的jquery对象
				console.log(jQueryObj2.parent());
				
			});
		</script>
	</body>
</html>
